package entities 
{
	import flash.events.MouseEvent;
	import flash.filters.BlurFilter;
	import flash.filters.ColorMatrixFilter;
	import flash.filters.GlowFilter;
	import flash.geom.Rectangle;
	import pure.engine.model.IAnime;
	import pure.engine.model.IText;
	import pure.engine.status.motion.PlatformMotion;
	import pure.engine.model.Entity;
	import pure.engine.model.IEntityFactory;
	import pure.engine.model.AnimeRenderer;
	import pure.engine.status.motion.PlatformMotion;
	
	/**
	 * ...
	 * @author Pure
	 */
public class PlatformBoy implements IEntityFactory 
{

	
	public function get layerIndex():int
	{
		return 44;
	}
	
	public function produce(E:Entity, args:Array = null):void
	{
		var R:IAnime;
		var T:IText;

		E.setRealRect(new Rectangle(11-16, 2-15.5, 10, 29));
		R = E.createAnimeRenderer('colonist_32_32','p');
		R.play('right_jump')
		//R.addFilter(cmf2);
		//R.alpha = 0.5;
		//R.addFilter(new BlurFilter(2,2));
		R.addFilter(new GlowFilter(0xeeee22,0.7,22,22,2));
		
		T = E.createTextRenderer('player', 0, -20,10);
		//T.setBackground(0xFFFF00, 0.8, 4, 1, 0,0.6);
		T.size = 20;
		var S:PlatformMotion = new PlatformMotion(100, 16, 140)
		E.addStatus(S);
		S.setTicked(true);
	}
	
	
	private var cmf2:ColorMatrixFilter=new ColorMatrixFilter([1, 0, 0, 0, 0,
														1, 0, 0, 0, 0,
														0, 0, 0, 0, 0,
														0, 0, 0, 0.9, 0]);
														
														
}

}